import java.util.Random;

public class Main {

    /**
     * @param args
     */
    public static void main(String[] args) {
        int map[][] = new int[10][10];

        initMap(map);
        
        printMap(map);
        
        int howManyProceed = printYutSet();
        
        System.out.println(howManyProceed);
    }
    
    public static void initMap(int[][] map){
        for (int i = 0 ; i < 10 ; i ++){
            for (int j = 0 ; j < 10 ; j++){
                map[i][j] = 0;
            }
        }
        
        for (int i = 1 ; i < 9 ; i++){
            for (int j = 1; j < 9 ; j++){
                map[i][j] = -1;
            }
        }
    }

    private static void printMap(int[][] map) {
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                switch(map[i][j]){
                    case 0 : 
                        System.out.print("○");
                        break;
                    case -1 : 
                        System.out.print("  ");
                        break;
                    case 1 : 
                        System.out.print("□");
                        break;

                }
            }
            System.out.println();
        }
    }
    
    private static int printYut(int opt) {
        switch(opt){
            case 0:
                System.out.println("┌───────┐");
                System.out.println("│    X  X  X   │");
                System.out.println("└───────┘");
                break;
            case 1:
                System.out.println("┌───────┐");
                System.out.println("│              │");
                System.out.println("└───────┘");
                break;
        }
        
        return opt;
    }
    
    private static int printYutSet(){
        Random random = new Random(System.currentTimeMillis());
        
        int sum = 0;
        
        for (int i = 0 ; i < 4 ; i++){
            sum += printYut(random.nextInt(2));
        }
        
        if (sum == 0) { // 만약 뒷면(x 표시가 없는 면)이 나온 윷이 하나도 없다면 '모' 이므로 5칸 전진.
            sum = 5;
        }
        
        return sum;
    }
}
